<%@ Page Language="C#" MasterPageFile="~/MasterPagee.master" AutoEventWireup="true"
    Inherits="LiameTestProject.JavascriptGenerator"
    ValidateRequest="false"
    MaintainScrollPositionOnPostback="true"
    Title="Liame Javascript Generator" %>

<%@ Register Assembly="Liame" Namespace="Liame" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel runat="server" ID="panel1" CssClass="mainbody" DefaultButton="Button1">
        <div>
            <h3>Generate your Javascript code</h3>
            <table border="0" cellspacing="0" cellpadding="2" style="width: 60%">
                <tr>
                    <td>
                        CODEC:</td>
                    <td>
                        <asp:DropDownList ID="DropDownList1" runat="server">
                            <asp:ListItem Value="1">ROT(N) Codec</asp:ListItem>
                            <asp:ListItem Value="2">Base64 Codec</asp:ListItem>
                            <asp:ListItem Value="3">Hexadecimal Codec</asp:ListItem>
                            <asp:ListItem Value="0">Null Codec (clear text)</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td>
                        Email:</td>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server" Width="198px">user@domain.com</asp:TextBox><asp:RegularExpressionValidator
                            ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
                            Display="Dynamic" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmail"
                            Display="Dynamic">*</asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td>
                        No Script:</td>
                    <td>
                        <asp:CheckBox ID="chkUseDisplay" runat="server" Text="Use Display none" />
                        <asp:CheckBox ID="chkUseTextDirection" runat="server" Text="Use Text Direction" /></td>
                </tr>
                <tr>
                    <td>
                        Text:</td>
                    <td>
                        <asp:TextBox ID="txtText" runat="server" Width="198px">John Doe</asp:TextBox>
                        (Not required)</td>
                </tr>
                <tr>
                    <td>
                        Title:</td>
                    <td>
                        <asp:TextBox ID="txtTitle" runat="server" Width="198px">Contact</asp:TextBox>
                        (Not required)</td>
                </tr>
                <tr>
                    <td>
                        Default subject:</td>
                    <td>
                        <asp:TextBox ID="txtSubject" runat="server" Width="198px"></asp:TextBox>
                        (Not required)</td>
                </tr>
                <tr>
                    <td>
                        Message body:</td>
                    <td>
                        <asp:TextBox ID="txtBody" runat="server" Width="198px"></asp:TextBox>
                        (Not required)</td>
                </tr>
                <tr>
                    <td>
                        CSS Class</td>
                    <td>
                        <asp:TextBox ID="txtCSSClass" runat="server" Width="198px"></asp:TextBox>
                        (Not required)</td>
                </tr>
            </table>
            <br />
            <asp:Button ID="Button1" runat="server" Text="Generate!" UseSubmitBehavior="true"
                OnClick="Button1_Click" /><br />
            <hr />
            <h3>
                Output:</h3>
            <cc1:Liame ID="Liame1" runat="server" Visible="False">
            </cc1:Liame>
            <h3>
                Javascript:</h3>
            <p>
                <asp:TextBox ID="txtJavascript" runat="server" Rows="20" TextMode="MultiLine" Width="60%"></asp:TextBox>&nbsp;</p>
            Now you can copy & paste the code into your Web page (<asp:Label ID="lblBytes" runat="server" Text="0"></asp:Label>
            chars).
        </div>
        <script type="text/javascript">
            document.getElementById('<%= txtJavascript.ClientID %>').select();
        </script>
    </asp:Panel>
</asp:Content>
